/**
 * 2010(c) Copyright Oceansoft Information System Co.,LTD. All rights reserved.
 * <p>
 * Compile: JDK 1.6+
 * <p>
 * 版权所有(C)：江苏欧索软件有限公司
 * <p>
 * 公司名称：江苏欧索软件有限公司
 * <p>
 * 公司地址：中国苏州科技城青山路1号
 * <p>
 * 网址: http://www.oceansoft.com.cn
 * <p>
 * 作者: 090922(陈伟)
 * <p>
 * 文件名: com.oceansoft.mobile.biz.front.entity.Template.java
 * <p>
 * 类产生时间: 2014/3/26 20:28
 * <p>
 * 负责人: 090922(陈伟)
 * <p>
 * Email:javacspring@gmail.com
 * <p>
 * 所在组 : 掌上公安应用平台
 * <p>
 * 所在部门: 开发部--手持技术部
 * <p>
 * <p>
 */
package com.oceansoft.mobile.biz.admin.entity;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * 页面展示模版
 *
 * @author: chenw
 * @time: 2014/3/26 20:28
 */
public class Template {

    private int id;
    private int level;
    private String title;
    private String remark;
    private String pic;//缩略图
    private String path;//模版存储路径
    private int version;

    public Template() {
    }

    public static RowMapper<Template> getFullRowMapper() {
        return new RowMapper<Template>() {
            @Override
            public Template mapRow(ResultSet rs, int rowNum) throws SQLException {
                Template obj = new Template();
                obj.setId(rs.getInt("ID"));
                obj.setLevel(rs.getInt("LEVEL"));
                obj.setTitle(rs.getString("TITLE"));
                obj.setPic(rs.getString("PIC"));
                obj.setRemark(rs.getString("REMARK"));
                obj.setPath(rs.getString("PATH"));
                obj.setVersion(rs.getInt("VERSION"));
                return obj;
            }
        };
    }

    public static RowMapper<Template> getIdAndTitleRemarkPathRowMapper() {
        return new RowMapper<Template>() {
            @Override
            public Template mapRow(ResultSet rs, int rowNum) throws SQLException {
                Template obj = new Template();
                obj.setId(rs.getInt("ID"));
                obj.setTitle(rs.getString("TITLE"));
                obj.setRemark(rs.getString("REMARK"));
                obj.setPath(rs.getString("PATH"));
                return obj;
            }
        };
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }
}
